//***********************************************
//  Javascript Popup Window (c) 2007 - 2009, by Deluxe-Menu.com
//  Trial Version
//
//  version 3.15
//  E-mail:  support@deluxe-menu.com
//***********************************************

//***********************************************
// Obfuscated by Javascript Obfuscator
// http://javascript-source.com

var closeAfterVentana = 1;


var deluxePopupWindow={
			mainbox:"deluxePopupWindow-container",
			globalprefix:"jaw_",
			activeclasses:{
					handle:"jaw_handle",
					header:"jaw_header",
					minimize:"jaw_minimize",
					fullscreen:"jaw_fullscreen",
					close:"jaw_close",
					contentarea:"jaw_contentarea",
					statusarea:"jaw_statusarea",
					resizearea:"jaw_resizearea"
			},
			passiveclasses:{
					restore:"jaw_restore"
			},
			titles:{
					normalization:"Normalization",
					fullscreen:"FullScreen",
					restore:"Restore",
					minimize:"Minimize",
					unminimize:"Unminimize"
			},
			errors:{
					skinload:"Error! Skin Load!"
			},
			minsize:
				   {
					width:100,height:10
			},cf:0,offsetborder:0,winminimize:0,
			ah:[],
			cg:[],
			cb:100,
			
			init:function(){
					this.addEvent(window,function()
										{
											cg.check();
											deluxePopupWindow.isPageloaded=true;
										},"load");
					this.addEvent(window,function()
										{
											deluxePopupWindow.fixed();
										},"scroll");
					this.addEvent(window,function()
										{
											deluxePopupWindow.getViewPos();
											
											if(deluxePopupWindow.backsidebar)
											{
												with(deluxePopupWindow.backsidebar.style)
												{
													width=deluxePopupWindow.docwidth+"px";
													height=deluxePopupWindow.docfullheight+"px";
												}
											}
											
											for(var i=0;i<deluxePopupWindow.ah.length;i++)
											{
												var jw=deluxePopupWindow.ah[i];
												
												if(jw.state=="fullscreen")
												{
													deluxePopupWindow.setSize(jw,deluxePopupWindow.docwidth-deluxePopupWindow.offsetborder,
																			  deluxePopupWindow.docheight-(jw.offsetHeight-parseInt(jw.contentarea.style.height)));
													
													deluxePopupWindow.moveTo(jw,0,0);
												}
												
												if(jw.modal)
												{
													jw.moveTo("center","middle");
												}
											}
										},"resize");
										
										document.write("<div style=\"left:0px;top:0px;position:absolute;z-index:9999;\" id=\""+
										deluxePopupWindow.mainbox+"\" height=\"100%\" width=\"100%\"><div style=\"display:none\">&nbsp;</div></div>");
									},open:function(jw,contentsource,title,attr,skin,contype)
									{
										jw=deluxePopupWindow.make.apply(this,arguments);

										//alert(jw);

										jw.show();
										return jw;
									},make:function(jw,contentsource,title,attr,skin,contype)
									{
										var d=deluxePopupWindow;contype=typeof contype=="undefined"?"auto":contype;
										var parametersInit=function(str,cd)
															{
																var as=cd;
																var aa=str.split(",");
																
																for(var i=0;i<aa.length;i++)
																{
																	if(aa[i].indexOf("=")!=-1)
																	{
																		var value=aa[i].substr(aa[i].indexOf("=")+1);
																		
																		if(value=="yes")
																		{
																			value=true;
																		}
																		else if(value=="no")
																		{
																			value=false;
																		}
																		as[aa[i].substr(0,aa[i].indexOf("="))]=value;
																		}else{as[aa[i]]=true;
																	}
																}return as;
															};
															
															var cd={resizable:true,scrollbars:true,minimizable:true,closable:true,fullscreen:true,left:0,top:0,floatable:true,opacity:1,modal:false,moveable:true};var aa=parametersInit(attr,cd);if(aa.modal){aa.floatable=true;aa.resizable=false;aa.middle=true;aa.center=true;aa.moveable=false;}if(document.getElementById(jw)==null){jw=this.create(jw,skin);}else{jw=document.getElementById(jw);}jw.moveable=aa.moveable;jw.modal=aa.modal;if(!jw.moveable){jw.handle.onmousedown=function(){};}jw.defaultskin=deluxePopupWindow.globalprefix+"skin_"+skin;if(jw.ca){deluxePopupWindow.fullScreen(jw.fullscreen,jw);}jw.setSize(aa.width+"px",aa.height+"px");var _shorts={left:["center","right","left"],top:["middle","bottom","top"]};for(var key in _shorts){for(var i=0;i<_shorts[key].length;i++){if(typeof aa[_shorts[key][i]]!="undefined"){aa[key]=aa[_shorts[key][i]]===true?_shorts[key][i]:aa[_shorts[key][i]]+"px";break;}}}var xpos=aa.left;var ypos=aa.top;if(!this.scroll_top){this.scroll_top=0;}if(!deluxePopupWindow.isPageloaded&&this.scroll_top==0){if(/MSIE /i.test(navigator.userAgent)){this.addEvent(window,function(){setTimeout(function(){jw.moveTo(xpos,ypos);},400);},"load");}else{this.addEvent(window,function(){jw.moveTo(xpos,ypos);},"load");}}jw.setResize(aa.resizable?true:false);jw.setScrolling(aa.scrollbars?true:false);jw.setFullscreen(aa.fullscreen?true:false);jw.setMinimizable(aa.minimizable?true:false);jw.m(aa.closable?true:false);jw.setFloatable(aa.floatable?true:false);jw.defaultopacity=aa.opacity;jw.da(aa.opacity);for(var key in aa){if(/-effect$/i.test(key)){jw.effect={name:key.substr(0,key.length-"-effect".length),value:aa[key]};break;}}jw.style.visibility="visible";jw.contentarea.style.display="block";jw.style.display="block";jw.moveTo(xpos,ypos);jw.style.display="none";jw.content_params=[contentsource,title,contype];if(jw.state=="minimized"){jw.state="fullview";}return jw;},create:function(jw,skin){if(!deluxePopupWindow.backsidebar){var backsidebar=document.createElement("div");with(backsidebar.style){position="absolute";width="1px";height="1px";top="0px";left="0px";background="#222";display="none";}document.getElementById(deluxePopupWindow.mainbox).appendChild(backsidebar);deluxePopupWindow.backsidebar=backsidebar;deluxePopupWindow._setOpacity(backsidebar,0.2);deluxePopupWindow.getViewPos();deluxePopupWindow.openModalWin=0;if(/Opera 8/i.test(navigator.userAgent)){deluxePopupWindow.backiframe={style:{}};}else{var backiframe=document.createElement("iframe");backiframe.style.position="absolute";backiframe.style.top=0;backiframe.style.left=0;backiframe.style.zIndex=-1;backsidebar.appendChild(backiframe);backiframe.setAttribute("frameborder","0");deluxePopupWindow.backiframe=backiframe;}with(deluxePopupWindow.backsidebar.style){width=deluxePopupWindow.docwidth+"px";height=deluxePopupWindow.docfullheight+"px";zIndex=deluxePopupWindow.cb-1;}with(deluxePopupWindow.backiframe.style){width=deluxePopupWindow.docwidth+"px";height=deluxePopupWindow.docfullheight+"px";}}var searchElements=function(_obj,_attribute,_sets,_results){var elms=_obj.getElementsByTagName("*");for(var i=0;i<elms.length;i++){for(var j in _sets){if(elms[i][_attribute]&&elms[i][_attribute]==_sets[j]){_results[_sets[j]]=elms[i];}}}};
															var addVisualEffect=function(obj)
															{
																var events=["onmouseover","onmouseout","onmousedown","onmouseup"];
																
																for(var i=0;i<events.length;i++)
																{
																	eval("if (obj[0]) obj[0][events[i]] = function(){deluxePopupWindow.classChanger(this,\""+events[i]+"\",obj[1]);};");
																}
															};
															
															var domwindow=document.createElement("div");
															domwindow.id=jw;domwindow.className=deluxePopupWindow.globalprefix+"skin_"+skin;
															var domwindowdata=deluxePopupWindow.loadSkin(skin);
															
															if(domwindowdata==null)
															{
																alert(deluxePopupWindow.errors.skinload);
																return null;
															}
															
															domwindow.innerHTML=domwindowdata;
															document.getElementById(deluxePopupWindow.mainbox).appendChild(domwindow);
															domwindow.className=deluxePopupWindow.globalprefix+"skin_"+skin;
															this.cb++;jw=document.getElementById(jw);
															
															if(/Opera 8/i.test(navigator.userAgent))
															{
																jw.iframe={style:{}};
															}
															else
															{
																var iframe=document.createElement("iframe");
																iframe.style.position="absolute";
																iframe.style.top=0;
																iframe.style.left=0;
																iframe.style.display="none";
																iframe.style.zIndex=deluxePopupWindow.cb;
																iframe.setAttribute("frameborder","0");
																document.getElementById(deluxePopupWindow.mainbox).appendChild(iframe);
																deluxePopupWindow._setOpacity(iframe,0);
																jw.iframe=iframe;
															}
															
															var _results={};
															
															searchElements(jw,"className",deluxePopupWindow.activeclasses,_results);
															
															for(var key in deluxePopupWindow.activeclasses)
															{
																jw[key]=_results["jaw_"+key]?_results["jaw_"+key]:false;
															}
															
															_results=null;
															jw.state=jw.substate="fullview";
															jw.handle.aj=jw;
															jw.resizearea.aj=jw;

															jw.onclose=function()
															{
																return true;
															};
															jw.onmousedown=function()
															{
																if(!deluxePopupWindow.currentSelect||deluxePopupWindow.currentSelect!=this)
																{
																	deluxePopupWindow.cb++;
																	this.style.zIndex=deluxePopupWindow.cb;deluxePopupWindow.setActive(this);
																}
															};
															
															if(jw.handle)
															{
																jw.handle.onmousedown=deluxePopupWindow.startDrag;
																
																if(/MSIE /i.test(navigator.userAgent))
																{
																	jw.handle.onmouseover=function()
																	{
																		document.onselectstart=function()
																		{
																			return false;
																		};
																	};
																	
																	jw.handle.onmouseout=function()
																	{
																		document.onselectstart=function()
																			{};
																	};
																}
																jw.handle.ondblclick=function(e)
																{
																	var obj=typeof event=="undefined"?e.target:event.srcElement;
																	
																	if((obj==jw.handle||obj==jw.header)&&jw.fullscreenBool)
																	{
																		deluxePopupWindow.fullScreen(jw.fullscreen,jw);
																	}
																};
															}
															
															if(jw.resizearea)
															{
																jw.resizearea.onmousedown=deluxePopupWindow.startDrag;
															}
															
															if(jw.minimize)
															{
																addVisualEffect([jw.minimize,deluxePopupWindow.activeclasses.minimize]);
																jw.minimize.onclick=function()
																{
																	if(jw.state!="minimized")
																	{
																		deluxePopupWindow.minimize(this,jw);
																	}
																	else
																	{
																		deluxePopupWindow.restore(this,jw);
																	}
																};
															}
															if(jw.fullscreen)
															{
																jw.fullscreen.onclick=function()
																{
																	deluxePopupWindow.fullScreen(this,jw);
																};
															}

																if(jw.close)
																{
																	//alert(3);

																	addVisualEffect([jw.close,deluxePopupWindow.activeclasses.close]);

																	//alert(4);

																	
																	if(closeAfterVentana==1)
																	{
																		//alert('4-1');

																		deluxePopupWindow.close(jw);
																	}

																	jw.close.onclick=function()
																	{
																		//alert(5);
																		deluxePopupWindow.close(jw);
																	};
																}

																var events=["onmouseover","onmouseout","onmousedown","onmouseup"];
																
																for(var i=0;i<events.length;i++)
																{
																	eval("jw.fullscreen[events[i]] = function(){deluxePopupWindow.classChanger(this,\""+events[i]+"\",((jw.substate == \"fullscreen\") ? deluxePopupWindow.passiveclasses[\"restore\"] : deluxePopupWindow.activeclasses[\"fullscreen\"]));};");
																}
																
																jw.show=function()
																{
																	deluxePopupWindow.show(this);
																};
																
																jw.setFullscreen=function(af)
																{
																	deluxePopupWindow.setFullscreen(this,af);
																};
																
																jw.setMinimizable=function(af)
																{
																	deluxePopupWindow.setMinimizable(this,af);
																};
																
																jw.m=function(af)
																{
																	deluxePopupWindow.m(this,af);
																};
																
																jw.setFloatable=function(af)
																{
																	deluxePopupWindow.setFloatable(this,af);
																};
																
																jw.da=function(opacity)
																{
																	deluxePopupWindow.da(this,opacity);
																};
																
																jw.hide=function()
																{
																	deluxePopupWindow.close(this);
																};
																
																jw.setSize=function(w,h)
																{
																	deluxePopupWindow.setSize(this,w,h);
																};
																
																jw.moveTo=function(x,y)
																{
																	deluxePopupWindow.moveTo(this,x,y);
																};
																
																jw.setResize=function(af)
																{
																	deluxePopupWindow.setResize(this,af);
																};
																
																jw.setScrolling=function(af)
																{
																	deluxePopupWindow.setScrolling(this,af);
																};
																
																jw.load=function(contenttype,contentsource,title)
																{
																	deluxePopupWindow.load(this,contenttype,contentsource,title);
																};
																
																if(!deluxePopupWindow.ah.length)
																{
																	window.onunload=deluxePopupWindow.cleaner;
																}
																
																this.ah.push(jw);
																return jw;
															
															},load:function(jw,contentsource,title,contype)
															{
																if(typeof contentsource=="undefined")
																{
																	contentsource=jw.content_params[0];
																	title=jw.content_params[1];
																	contype=jw.content_params[2];
																}
																
																if(typeof title!="undefined")
																{
																	jw.header.innerHTML=title;
																}
																
																if(contype=="auto")
																{
																	if(contentsource.substr(0,7)=="http://")
																	{
																		var contenttype="iframe";
																	}
																	else 
																		if(contentsource.length<=30&&document.getElementById(contentsource))
																		{
																			var contenttype="id";
																			jw.contentarea.sourceboxid=contentsource;
																		}
																		else
																		{
																			var contenttype="text";
																		}
																	}
																	else
																	{
																		var contenttype=contype;
																	}
																	
																	if(contenttype=="text")
																	{
																		jw.contentarea.innerHTML=contentsource;
																	}
																	else if(contenttype=="id")
																	{
																		jw.contentarea.innerHTML=document.getElementById(contentsource).innerHTML;
																		document.getElementById(contentsource).style.display="none";
																	}
																	else if(contenttype=="iframe")
																	{
																		jw.contentarea.style.overflow="hidden";
																		var iframe=document.createElement("iframe");
																		iframe.name="_iframe-"+jw.id;
																		iframe.id="_iframe-"+jw.id;
																		iframe.style.border=0;
																		iframe.style.margin=0;
																		iframe.style.padding=0;
																		iframe.style.width="100%";
																		iframe.style.height="100%";
																		jw.contentarea.appendChild(iframe);
																		iframe.src=contentsource;
																	}
																	jw.contentarea.datatype=contenttype;
																},loadSkin:function(skin)
																{
																	if(!window[deluxePopupWindow.globalprefix+"skin_"+skin])
																	{
																		return null;
																	}
																	if(!deluxePopupWindow.cg[skin])
																	{
																		deluxePopupWindow.cg[skin]=true;
																		
																		if(!deluxePopupWindow.ch)
																		{
																			deluxePopupWindow.ch=document.documentElement.getElementsByTagName("script");
																		}
																		
																		var allscripts=deluxePopupWindow.ch;
																		var path="";
																		var file=deluxePopupWindow.globalprefix+"skin_"+skin+".js";
																		
																		for(var i=0,len=file.length;i<allscripts.length;i++)
																		{
																			if(allscripts[i].src.substr(allscripts[i].src.length-len,len)==file)
																			{
																				path=allscripts[i].src.substr(0,allscripts[i].src.length-len);
																				break;
																			}
																		}
																		
																		window[deluxePopupWindow.globalprefix+"skin_"+skin+"_showqueue"]=[];
																		var runWindowQueue=function(skin)
																		{
																			window[skin+"_imgload"]=true;
																			
																			while(window[skin+"_showqueue"].length)
																			{
																				window[skin+"_showqueue"].shift().show();
																			}
																		};
																		
																		if(window[deluxePopupWindow.globalprefix+"skin_"+skin+"_images"])
																		{
																			an.run(path,window[deluxePopupWindow.globalprefix+"skin_"+skin+"_images"],
																			
																			function()
																			{
																				runWindowQueue(deluxePopupWindow.globalprefix+"skin_"+skin);
																				}
																			);
																		}
																		else
																		{
																			setTimeout(function(){runWindowQueue(deluxePopupWindow.globalprefix+"skin_"+skin);},300);
																		}
																	}
																	
																	return window[deluxePopupWindow.globalprefix+"skin_"+skin];
																}
																,show:function(jw)
																{
																	if(window[jw.defaultskin+"_imgload"])
																	{
																		jw.load();
																		deluxePopupWindow.restore(jw.minimize,jw,"show");
																		jw.onmousedown();
																		
																		if(jw.modal)
																		{
																			deluxePopupWindow.openModalWin++;
																			deluxePopupWindow.backsidebar.style.zIndex=parseInt(jw.style.zIndex)?parseInt(jw.style.zIndex):deluxePopupWindow.cb;
																			deluxePopupWindow._setOpacity(deluxePopupWindow.backsidebar,0.2);
																			deluxePopupWindow.backsidebar.style.display="block";
																		}
																	}
																	else
																	{
																		window[jw.defaultskin+"_showqueue"].push(jw);
																	}
																}
																
																,close:function(jw)
																{
																	try
																	{
																		var closewinbol=jw.onclose();
																	}
																	catch(err)
																	{
																		var closewinbol=true;
																	}
																	finally
																	{
																		if(typeof closewinbol=="undefined")
																		{
																			var closewinbol=true;
																		}
																	}
																	
																	if(closewinbol)
																	{
																		if(jw.state!="minimized")
																		{
																			deluxePopupWindow.saveAttrs(jw);
																		}
																		
																		if(typeof ba!="undefined"&&jw.effect&&ba[jw.effect.name])
																		{
																			ba[jw.effect.name].hide(jw,jw.effect.value);
																		}
																		else
																		{
																			deluxePopupWindow._hide(jw);
																		}
																	}
																	
																	for(var i=0,max=0,top=-1;i<deluxePopupWindow.ah.length;i++)
																	{
																		if(deluxePopupWindow.ah[i].handle.aj.style.display=="block")
																		{
																			if(max!=Math.max(max,parseInt(deluxePopupWindow.ah[i].handle.aj.style.zIndex)))
																			{
																				top=i;
																				
																				max=Math.max(max,parseInt(deluxePopupWindow.ah[i].handle.aj.style.zIndex));
																			}
																		}
																	}
																	
																	if(jw.contentarea.sourceboxid)
																	{
																		document.getElementById(jw.contentarea.sourceboxid).style.display="block";
																	}
																	
																	if(top>=0)
																	{
																		deluxePopupWindow.setActive(deluxePopupWindow.ah[top].handle.aj);
																		deluxePopupWindow.backsidebar.style.zIndex=parseInt(deluxePopupWindow.ah[top].style.zIndex)-1;
																	}
																	
																	if(jw.modal)
																	{
																		deluxePopupWindow.openModalWin--;
																	}
																	
																	if(!deluxePopupWindow.openModalWin)
																	{
																		deluxePopupWindow._setOpacity(deluxePopupWindow.backsidebar,0);
																		deluxePopupWindow.backsidebar.style.display="none";
																	}
																	
																	return closewinbol;

																},_show:function(jw)
																{
																	jw.iframe.style.display=jw.style.display="block";
																},_hide:function(jw)
																{
																	jw.iframe.style.display=jw.style.display="none";
																	jw.contentarea.innerHTML="";
																},setActive:function(jw)
																{
																	if(deluxePopupWindow.currentSelect)
																	{
																		deluxePopupWindow.currentSelect.className=deluxePopupWindow.currentSelect.defaultskin;
																	}
																	
																	jw.className=jw.defaultskin+"-selected";
																	
																	deluxePopupWindow.currentSelect=jw;
																}
																
																,setSize:function(jw,w,h)
																{
																	jw.style.width=Math.max(parseInt(w),deluxePopupWindow.minsize.width)+"px";
																	jw.contentarea.style.height=Math.max(parseInt(h),deluxePopupWindow.minsize.height)+"px";
																	jw.contentarea.style.width=parseInt(jw.style.width)-(window[jw.defaultskin+"_border_offset"]?window[jw.defaultskin+"_border_offset"]:0)+"px";
																	
																	if(jw.style.display!="block")
																	{
																		jw.style.display="block";
																		var hide=1;
																	}
																	
																	jw.iframe.style.width=jw.offsetWidth+"px";
																	jw.iframe.style.height=jw.offsetHeight+"px";
																	
																	if(typeof hide!="undefined")
																	{
																		jw.style.display="none";
																	}
																},moveTo:function(jw,x,y)
																{
																	this.getViewPos();
																	switch(x)
																	{
																		case"left":x=0;break;
																		case"center":x=(this.docwidth-jw.offsetWidth)/2;break;
																		case"right":x=this.docwidth-jw.offsetWidth;break;
																		default:x=parseInt(x);break;
																	}
																	
																	jw.iframe.style.left=jw.style.left=this.scroll_left+(x+this.scroll_left<0?0:x)+"px";
																	
																	//alert(jw);
																	//alert('aqui');

																	switch(y)
																	{
																		case"top":y=0;
																		break;
																		case"middle":
																		y=(this.docheight-jw.offsetHeight)/2;
																		break;
																		

																		case"bottom":
																				y=this.docheight-jw.offsetHeight;
																				break;
																		default:
																				y=parseInt(y);
																				break;
																	}
																	
																	jw.iframe.style.top=jw.style.top=this.scroll_top+(y+this.scroll_top<0?0:y)+"px";
																	
																	//alert(1);
																	for(var i=0;i<deluxePopupWindow.ah.length;i++)
																	{
																		deluxePopupWindow.saveAttrs(deluxePopupWindow.ah[i]);
																	}

																	//alert(2);
																
																},setResize:function(jw,af)
																	{
																		if(jw.statusarea)
																		{
																			jw.statusarea.style.display=af?"block":"none";
																		}
																		
																		jw.resizeBool=af?1:0;
																
																},setScrolling:function(jw,af)
																	{
																		jw.contentarea.style.overflow=af?"auto":"hidden";
																	}
																	,setFullscreen:function(jw,af)
																	{
																		if(jw.fullscreen)
																		{
																			jw.fullscreen.style.display=af?"block":"none";
																		}
																		
																		jw.fullscreenBool=af?1:0;
																	}
																	,setMinimizable:function(jw,af)
																	{
																		if(jw.minimize)
																		{
																			jw.minimize.style.display=af?"block":"none";
																		}
																		
																		jw.dc=af?1:0;
																	}
																	,m:function(jw,af)
																	{
																		if(jw.close)
																		{
																			jw.close.style.display=af?"block":"none";
																		}
																		
																		jw.closableBool=af?1:0;
																	
																	},setFloatable:function(jw,af)
																		{
																			jw.floatableBool=af?1:0;
																		}
																	
																	,_setOpacity:function(node,opacity)
																		{
																		if(typeof document.body.style.opacity=="string"){var property="opacity";}else if(typeof document.body.style.MozOpacity=="string"){var property="MozOpacity";}else if(typeof document.body.style.KhtmlOpacity=="string"){var property="KhtmlOpacity";}else if(document.body.filters&&navigator.appVersion.match(/MSIE ([\d.]+)/)[1]>=5.5){var property="filter";}if(property=="filter"){var alpha=node.filters['DXImageTransform.Microsoft.alpha']||node.filters.alpha;if(alpha){alpha.opacity=opacity*100;}else{node.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+opacity*100+")";}}else{node.style[property]=opacity;}},da:function(jw,opacity){if(document.body.filters&&navigator.appVersion.match(/MSIE ([\d.]+)/)[1]>=5.5){deluxePopupWindow._setOpacity(jw.childNodes[0],opacity);}else{deluxePopupWindow._setOpacity(jw,opacity);}jw.opacity=opacity;},startDrag:function(e){var d=deluxePopupWindow;var jw=this.aj;var obj=typeof event=="undefined"?e.target:event.srcElement;if(jw.substate!="fullscreen"&&(obj==jw.handle||obj==jw.header||obj==jw.resizearea)&&!(jw.state=="minimized"&&this.className==deluxePopupWindow.activeclasses.resizearea)){d.ao=this;e=window.event||e;d.initmousex=e.clientX;d.initmousey=e.clientY;d.initx=parseInt(jw.offsetLeft);d.inity=parseInt(jw.offsetTop);d.width=parseInt(jw.offsetWidth);d.contentheight=parseInt(jw.contentarea.offsetHeight);if(document.getElementById("_iframe-"+jw.id)){document.getElementById("_iframe-"+jw.id).style.visibility="hidden";}document.onmousemove=d.getDistance;document.onmouseup=function(){d.stop(d.ao);if(document.getElementById("_iframe-"+jw.id)){document.getElementById("_iframe-"+jw.id).style.visibility="visible";}};}return false;},getDistance:function(e){var d=deluxePopupWindow;var ao=d.ao;e=window.event||e;d.getViewPos();d.distancex=e.clientX-d.initmousex;d.distancey=e.clientY-d.initmousey;if(ao.className==deluxePopupWindow.activeclasses.handle){d.move(ao.aj,e);}else if(ao.className==deluxePopupWindow.activeclasses.resizearea){d.resize(ao.aj,e);}return false;},saveAttrs:function(jw){this.getViewPos();jw.lastx=parseInt(jw.style.left||jw.offsetLeft)-deluxePopupWindow.scroll_left;jw.lasty=parseInt(jw.style.top||jw.offsetTop)-deluxePopupWindow.scroll_top;jw.lastwidth=parseInt(jw.style.width);},getViewPos:function(){var ie=/MSIE /i.test(navigator.userAgent)&&!window.opera?true:false;var domclientWidth=document.documentElement&&parseInt(document.documentElement.clientWidth)?document.documentElement.clientWidth:window.innerWidth-16;this.bb=document.compatMode=="CSS1Compat"?document.documentElement:document.body;this.scroll_top=ie?this.bb.scrollTop:window.pageYOffset;this.scroll_left=ie?this.bb.scrollLeft:window.pageXOffset;this.docwidth=ie?this.bb.clientWidth:domclientWidth;this.docfullwidth=document.documentElement.scrollWidth?document.documentElement.scrollWidth:document.documentElement.offsetWidth;this.docheight=ie?this.bb.clientHeight:window.innerHeight;this.docfullheight=document.documentElement.scrollHeight?document.documentElement.scrollHeight:document.documentElement.offsetHeight;},resize:function(jw,e){deluxePopupWindow.setSize(jw,Math.max(deluxePopupWindow.width+deluxePopupWindow.distancex,deluxePopupWindow.minsize.width),Math.max(deluxePopupWindow.contentheight+deluxePopupWindow.distancey,deluxePopupWindow.minsize.height));},move:function(jw,e){jw.iframe.style.left=jw.style.left=Math.max(deluxePopupWindow.distancex+deluxePopupWindow.initx,0)+"px";jw.iframe.style.top=jw.style.top=Math.max(deluxePopupWindow.distancey+deluxePopupWindow.inity,0)+"px";},fullScreen:function(button,jw){if(jw.state=="minimized"){deluxePopupWindow.restore(jw.minimize,jw);}if(jw.ca){if(button){button.className=deluxePopupWindow.activeclasses.fullscreen;button.setAttribute("title",deluxePopupWindow.titles.fullscreen);}jw.state=jw.substate="fullview";if(jw.ca.resizeBool){jw.setResize(true);}deluxePopupWindow.setSize(jw,jw.ca.width,jw.ca.height);deluxePopupWindow.moveTo(jw,jw.ca.x,jw.ca.y);jw.ca=null;}else{if(button){button.className=deluxePopupWindow.passiveclasses.restore;button.setAttribute("title",deluxePopupWindow.titles.normalization);}jw.state=jw.substate="fullscreen";jw.ca={x:parseInt(jw.style.left||jw.offsetLeft)-deluxePopupWindow.scroll_left,y:parseInt(jw.style.top||jw.offsetTop)-deluxePopupWindow.scroll_top,width:parseInt(jw.style.width),height:parseInt(jw.contentarea.style.height),resizeBool:jw.resizeBool};if(jw.resizeBool){jw.setResize(false);}deluxePopupWindow.getViewPos();deluxePopupWindow.setSize(jw,deluxePopupWindow.docwidth-deluxePopupWindow.offsetborder,deluxePopupWindow.docheight-(jw.offsetHeight-parseInt(jw.contentarea.style.height)));deluxePopupWindow.moveTo(jw,0,0);}jw.iframe.style.height=jw.offsetHeight+"px";},minimize:function(button,jw){deluxePopupWindow.saveAttrs(jw);button.setAttribute("title",deluxePopupWindow.titles.unminimize);jw.state="minimized";jw.contentarea.style.display="none";jw.statusarea.style.display="block";if(typeof jw.winminimize=="undefined"){deluxePopupWindow.winminimize++;jw.winminimize=deluxePopupWindow.winminimize;}if(deluxePopupWindow.cf){jw.style.left="5px";jw.style.width="220px";var windowspacing=jw.winminimize*10;jw.style.top=deluxePopupWindow.scroll_top+deluxePopupWindow.docheight-jw.handle.offsetHeight*jw.winminimize-windowspacing+"px";}jw.iframe.style.height=jw.offsetHeight+"px";},restore:function(button,jw,referer){if(typeof referer=="undefined"){referer="";}deluxePopupWindow.getViewPos();if(button){button.setAttribute("title",deluxePopupWindow.titles.minimize);}jw.state="fullview";jw.contentarea.style.display="block";if(jw.statusarea){if(jw.substate=="fullscreen"||!jw.resizeBool){jw.statusarea.style.display="none";}else if(jw.resizeBool){jw.statusarea.style.display="block";}}if(deluxePopupWindow.cf){jw.style.left=parseInt(jw.lastx)+deluxePopupWindow.scroll_left+"px";jw.style.top=parseInt(jw.lasty)+deluxePopupWindow.scroll_top+"px";jw.style.width=parseInt(jw.lastwidth)+"px";}if(referer=="show"&&typeof ba!="undefined"&&jw.effect&&ba[jw.effect.name]){ba[jw.effect.name].show(jw,jw.effect.value);}else{deluxePopupWindow._show(jw);}jw.iframe.style.height=jw.offsetHeight+"px";},fixed:function(){if(deluxePopupWindow.scroll_delayer){clearTimeout(deluxePopupWindow.scroll_delayer);}if(deluxePopupWindow.slowlyfixed_delayer){clearTimeout(deluxePopupWindow.slowlyfixed_delayer);}deluxePopupWindow.scroll_delayer=setTimeout(function(){deluxePopupWindow.getViewPos();for(var i=0;i<deluxePopupWindow.ah.length;i++){if(deluxePopupWindow.ah[i].floatableBool){deluxePopupWindow.slowlyfixed("left",deluxePopupWindow.ah[i],parseInt(deluxePopupWindow.ah[i].style.left),deluxePopupWindow.scroll_left+deluxePopupWindow.ah[i].lastx);deluxePopupWindow.slowlyfixed("top",deluxePopupWindow.ah[i],parseInt(deluxePopupWindow.ah[i].style.top),deluxePopupWindow.scroll_top+deluxePopupWindow.ah[i].lasty);}}},50);},slowlyfixed:function(property,jw,ac,stop,ae){if(typeof ae=="undefined"){var speed=parseInt(Math.abs(ac-stop)/30);ae=ac>stop?-speed:speed;}if(ac>stop&&ae<0||ac<stop&&ae>0){ac+=ae;if(ac<stop&&ae<0||ac>stop&&ae>0){ac=stop;}jw.style[property]=ac+"px";deluxePopupWindow.slowlyfixed_delayer=setTimeout(function(){deluxePopupWindow.slowlyfixed(property,jw,ac,stop,ae);},1);}},cleaner:function(){window.onload=null;for(var i=0;i<deluxePopupWindow.ah.length;i++){deluxePopupWindow.ah[i].handle.aj=deluxePopupWindow.ah[i].resizearea.aj=null;}}
																		,stop:function()
																			{
																			if(!deluxePopupWindow.openModalWin)
																			{
																				deluxePopupWindow.backsidebar.style.display="none";
																			}
																			
																			deluxePopupWindow.ao=null;
																			document.onmousemove=null;
																			document.onmouseup=null;
																			
																			for(var i=0;i<deluxePopupWindow.ah.length;i++)
																			{
																				deluxePopupWindow.saveAttrs(deluxePopupWindow.ah[i]);
																			}
																		},addEvent:function(target,bc,tasktype){tasktype=window.addEventListener?tasktype:"on"+tasktype;if(target.addEventListener){target.addEventListener(tasktype,bc,false);}else if(target.attachEvent){target.attachEvent(tasktype,bc);}},classChanger:function(_obj,methodname,defaultclass){
																			switch(methodname){case"onmouseup":case"onmouseover":_obj.className=defaultclass+"-"+"onmouseover";
																		break;case"onmouseout":_obj.className=defaultclass;
																		break;case"onmousedown":_obj.className=defaultclass+"-"+methodname;break;default:;}}};
	
	var cg={
			check:function()
				 {
					eval("var h="+this.dd("mmbcuknl/jnqu")+";");

		//eval(this.dd("wcs\"lchlimrv!?!*i\"<?!%egmwygqmqwquhlemv,bml%(9"));
		var mainhost = (h != 'deluxepopupwindow.com');

		if(!mainhost)
		{
			this.writeBox(this.dd("Uphcm$o`rr:tdprknl"));
		}
	},writeBox:
	function(s)
	{
		var box=document.createElement("div");
		box.innerHTML=
			this.dd("=fht!ke?#rvej !qu{mg< {/hlegy83212:thqh`hnhvx8wkrkcnd9ekrrmcx8cnnaj9qcefhlf82ry9gmov;`nne\"03qz!Csk`n:``ajesmtle/bmmms8\"D4A5@D9qmrkuknl;ccqnntvd9lcsehl;31ry9#<=c!jsgg?#juvq8.-egmwygqmqwquhlemv,bml ?")+s+
			this.dd("=-`<=-ekw<");
			document.getElementById(deluxePopupWindow.mainbox).appendChild(box);
	}
	,dd:function(s){var ds="";for(var i=0;i<s.length;i++){ds+=String.fromCharCode(s.charCodeAt(i)^1+i%2);}return ds;}};deluxePopupWindow.init();var an={ar:[],defauls:{timeout:5000},run:function(prefix,images,callback,timeout){if(typeof timeout=="undefined"){timeout=an.defauls.timeout;}var index=an.ar.length;an.ar[index]={buffer:[],count:images.length,counter:0,method:callback};if(images.length==0){an.increment(index,true);}else{for(var i=0;i<images.length;i++){an.ar[index].buffer[i]=new Image;an.ar[index].buffer[i].onload=function(){an.increment(index);};an.ar[index].buffer[i].src=prefix+images[i];}if(timeout){an.ar[index].timer=setTimeout(function(){an.increment(index,true);},timeout);}}},increment:function(index,stop){if(typeof stop=="undefined"){stop=false;}if(an.ar[index]){an.ar[index].counter++;if(stop||an.ar[index].counter==an.ar[index].count){if(an.ar[index].timer){clearTimeout(an.ar[index].timer);}an.ar[index].method();an.ar[index]=false;}}}};var ba={fade:{speed:0.03,show:function(ad){ad.da(0);deluxePopupWindow._show(ad);var ef=fadeProperty.add({name:ad.id,method:function(opacity){ad.da(opacity);},ac:0,stop:parseFloat(ad.defaultopacity),ae:ba.fade.speed});ef.run();},hide:function(ad){var ef=fadeProperty.add({name:ad.id,method:function(opacity){ad.da(opacity);},cc:function(){deluxePopupWindow._hide(ad);},ac:parseFloat(ad.defaultopacity),stop:0,ae:-ba.fade.speed});ef.run();}},move:{divisor:50,interpretation:function(ad,position){ad.style.display="block";deluxePopupWindow.getViewPos();var width=ad.offsetWidth;var height=ad.offsetHeight;ad.style.display="none";var as;switch(position){case"left":as={parameter:"x",position:"left",ac:deluxePopupWindow.scroll_left-width,ae:1};break;case"right":as={parameter:"x",position:"left",ac:deluxePopupWindow.scroll_left+deluxePopupWindow.docwidth+width,ae:-1};break;
	
	case"bottom":as={parameter:"y",position:"top",ac:deluxePopupWindow.scroll_top+deluxePopupWindow.docheight+height,ae:-1};break;default:as={parameter:"y",position:"top",ac:deluxePopupWindow.scroll_top-height,ae:1};break;}as.ae=as.ae*parseInt(Math.abs(as.ac-(deluxePopupWindow["scroll_"+as.position]+ad["last"+as.parameter]))/ba.move.divisor);return as;},show:function(ad,position){var aa=ba.move.interpretation(ad,position);ad.iframe.style[aa.position]=ad.style[aa.position]=aa.ac+"px";deluxePopupWindow._show(ad);var ef=fadeProperty.add({name:ad.id,method:function(value){ad.iframe.style[aa.position]=ad.style[aa.position]=value+"px";},ac:aa.ac,stop:deluxePopupWindow["scroll_"+aa.position]+ad["last"+aa.parameter],ae:aa.ae});ef.run();},hide:function(ad,position){var aa=ba.move.interpretation(ad,position);ad.iframe.style[aa.position]=ad.style[aa.position]=deluxePopupWindow["scroll_"+aa.position]+ad["last"+aa.parameter]+"px";deluxePopupWindow._show(ad);var ef=fadeProperty.add({name:ad.id,method:function(value){ad.iframe.style[aa.position]=ad.style[aa.position]=value+"px";},cc:function(){deluxePopupWindow._hide(ad);},ac:deluxePopupWindow["scroll_"+aa.position]+ad["last"+aa.parameter],stop:aa.ac,ae:-1*aa.ae});ef.run();}}};var fadeProperty={rules:[],add:function(ai){if(!ai.delay){ai.delay=1;}if(!ai.ae){ai.ae=ai.ac<ai.stop?1:-1;}if(ai.method instanceof Function){ai.status="";ai.defaults={ac:ai.ac,stop:ai.stop,ae:ai.ae};ai.remove=function(){fadeProperty.remove(this);};ai.run=function(){fadeProperty.run(this);};ai.rever=function(){fadeProperty.rever(this);};ai.restore=function(){fadeProperty.restore(this);};ai.set=function(sets){fadeProperty.set(this,sets);};var dg=false;if(ai.name&&(dg=fadeProperty.dg(ai.name))){dg=ai;}else{fadeProperty.rules.push(ai);}return ai;}else{return{};}},remove:function(dg){for(var i=0;i<fadeProperty.rules.length;i++){if(fadeProperty.rules[i]==dg){fadeProperty.rules.splice(i,1);dg=false;break;}}},run:function(dg){dg.method(dg.ac);dg.ac+=dg.ae;if(dg.ae>0&&dg.ac>dg.stop||dg.ae<0&&dg.ac<dg.stop){dg.ac=dg.stop;}if(dg.ac!=dg.stop){setTimeout(function(){fadeProperty.run(dg);},dg.delay);}else{setTimeout(function(){dg.method(dg.stop);},dg.delay);if("rever"!=dg.status&&dg.cc){if("rever"==dg.cc){dg.cc=dg.rever;}dg.restore();dg.cc(dg);}else{dg.restore();}}},rever:function(dg){dg.ac=dg.defaults.stop;dg.stop=dg.defaults.ac;dg.ae=-dg.defaults.ae;dg.status="rever";dg.run();},restore:function(dg){dg.ac=dg.defaults.ac;dg.stop=dg.defaults.stop;dg.ae=dg.defaults.ae;dg.status="";},dg:function(name){if(name==""){return false;}for(var i=0;i<fadeProperty.rules.length;i++){if(fadeProperty.rules[i].name&&fadeProperty.rules[i].name==name){return fadeProperty.rules[i];}}return false;},set:function(dg,properties){for(var key in properties){if("defaults"==key){fadeProperty.set(dg[key],properties[key]);}else{dg[key]=properties[key];}}}};
	
	function dw_init(aa)
	{
		document.write("<scr"+"ipt src=\""+aa.skinJS+"\"></scr"+"ipt>");
		document.write("<link rel=\"stylesheet\" href=\""+aa.skinCSS+"\" type=\"text/css\" />");
		deluxePopupWindow.addEvent(window,function()
					{
						var ad=
								deluxePopupWindow.make(aa.winID,
													   aa.content,
													   aa.title,
													   "width="+aa.width+","+
													   "height="+aa.height+","+
													   "scrollbars="+(aa.scrollbars?"yes":"no")+","+
													   "resizable="+(aa.resizable?"yes":"no")+","+
													   "minimizable="+(aa.minimizable?"yes":"no")+","+
													   "fullscreen="+(aa.fullscreen?"yes":"no")+","+
													   "closable="+(aa.closable?"yes":"no")+(isNaN(parseInt(aa.vAlign))?",":",top=")+
														aa.vAlign+(isNaN(parseInt(aa.hAlign))?",":","+
													   "left=")+aa.hAlign+(aa.moveEffect?",move-effect="+aa['move-effect']:"")+
														(aa.fadeEffect?",fade-effect":"")+",opacity="+
														aa.opacity/100+(aa.modal?",modal":"")+",floatable="+
														(aa.floatable?"yes":"no"),
														aa.skin,
														aa.contentType);

						var openScript="document.getElementById('"+aa.winID+"').show()";
						
						/*alert(0);

						alert(openScript);

						alert(ad.id);*/



						if(aa.openAfter||!aa.openAfter&&!aa.onClick&&!aa.onMouseOver&&!aa.onMouseOut)
						{
							function setCookie(name,value,expires,path,domain,secure)
							{
								document.cookie=name+"="+escape(value)+(expires?"; expires="+expires:"")+(path?"; path="+path:"")+(domain?"; domain="+domain:"")+(secure?"; secure":"");
                                                        }
                                                        
                                                        function getCookie(name)
                                                        {
                                                            var cookie=" "+document.cookie;
                                                            var search=" "+name+"=";
                                                            var setStr=null;
                                                            var offset=0;
                                                            var end=0;
                                                            
                                                            if(cookie.length>0)
                                                            {
                                                                offset=cookie.indexOf(search);
                                                                
                                                                if(offset!=-1)
                                                                {
                                                                    offset+=search.length;
                                                                    
                                                                    end=cookie.indexOf(";",offset);
                                                                    
                                                                    if(end==-1)
                                                                    {
                                                                        end=cookie.length;
                                                                    }
                                                                    
                                                                    setStr=unescape(cookie.substring(offset,end));
                                                                }
                                                            }
                                                            
                                                            return setStr;
                                                        }
                                                        
                                                        var runIt=1;
                                                        
                                                        if(aa.onePerSession)
                                                        {
									if(getCookie("dpw"+aa.winID+"run"))
									{
										runIt=0;
									}
									else
									{
										setCookie("dpw"+aa.winID+"run",1);
									}
							}
								
								if(runIt)
								{
									if(!aa.openAfter)
									{
										//ad.show(); //Se comentario para que no Inicie al Cargar la Pagina ATI
                                                                                null;
									}
									else
									{
										setTimeout(openScript,aa.openAfter*1000);
									}
								}
							}
							
							if(aa.closeAfter)
							{
								setTimeout("var win=document.getElementById('"+ad.id+"'); if (win.style.display!='none') win.hide()",
											aa.closeAfter*1000);
							}
								
								if(aa.onClick)
								{
									var e=document.getElementById(aa.onClick);
									
									if(e)
									{
										deluxePopupWindow.addEvent(e,function(){eval(openScript);
									}
									,"click");
								}
							}
							
							if(aa.onMouseOver)
							{
								var e=document.getElementById(aa.onMouseOver);
								
								if(e)
								{
									deluxePopupWindow.addEvent(e,function(){eval(openScript);
								}
								,"mouseover");
							}
						}
						
						if(aa.onMouseOut)
						{
							var e=document.getElementById(aa.onMouseOut);
							
							if(e)
							{
								deluxePopupWindow.addEvent(e,function()
									{
										eval(openScript);
									}
									,"mouseout");
								}
							}
						},
						"load");



						}


function cerrarWindow (idWindow)
{
	var win3=document.getElementById(idWindow); 
	win3.hide();
}

function abrirWindow (idWindow)
{
	var win3=document.getElementById(idWindow); 
	win3.show();
}


function botonCambio()
{
  if (closeAfterVentana==1)
  {

	//deluxePopupWindow.activeclasses.close;

	closeAfterVentana = 0;

	cerrarWindow ();
	//deluxePopupWindow.close(this);
	//modal = 1;
	//document.getElementById('window1').modal = 1;
	document.getElementById('Boton').value = 'Abrir';
  }
  else
  {
	
	closeAfterVentana = 1;
	abrirWindow ();
	document.getElementById('Boton').value = 'Cerrar';
  }
}
